<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="model.UserModel"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Flower Store</title>
<link rel="stylesheet" href="css/main.css" />
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/bootstrap-responsive.min.css" />
<link rel="stylesheet" type="text/css" href="resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css"	href="ux/css/LiveSearchGridPanel.css" />
<link rel="stylesheet" type="text/css"	href="ux/statusbar/css/statusbar.css" />
<script type="text/javascript" src="js/ext-all.js"></script>
<script type="text/javascript" src="js/msg-box.js"></script>
<script type="text/javascript" src="js/system.js"></script>
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<style type="text/css">
.order {
	background-image: url('shared/icons/fam/user_add.gif') !important;
}

.order-add {
	background-image: url('shared/icons/fam/user_add.gif') !important;
}

.order-remove {
	background-image: url('shared/icons/fam/user_delete.gif') !important;
}
</style>
</head>
<%
	UserModel user = (UserModel) session.getAttribute("user_session");
	String alert = (String) session.getAttribute("alert");
	if (user == null) {
		response.sendRedirect("./");
	}
%>
<body>
	<div class="navbar navbar-inverse navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container">
				<button data-target=".nav-collapse" data-toggle="collapse"
					class="btn btn-navbar" type="button">
					<span class="icon-bar"></span> <span class="icon-bar"></span> <span
						class="icon-bar"></span>
				</button>
				<a href="./#Home" class="brand">Flower Store</a>
				<div class="nav-collapse collapse">
					<ul class="nav">
						<li id="products"><a href="?p=products#Products">Sản phẩm</a></li>
						<li id="events"><a href="?p=events#Events">Sự kiện</a></li>
						<li id="eventgroups"><a href="?p=eventgroups#EventGroups">Loại sự kiện</a></li>
						<li id="types"><a href="?p=types#Types">Loại</a></li>
						<li id="types"><a href="?p=orders#Orders">Hóa đơn</a></li>
						<li id="logout"><a href="#Logout">Xin chào <font
								color="#ff0000"><%=user != null ? user.getUsername() : ""%></font>
								(thoát)
						</a></li>
					</ul>
				</div>
			</div>
		</div>
	</div>
	<div class="container">
		<div id="aero">
			<div id="aero1">
				<div id="content">
					<%
						String p = request.getParameter("p");
						if (p == null || p.equalsIgnoreCase("products")) {
					%>
					<div id="list-products"></div>
					<script type="text/javascript" src="js/products.jsp"></script>
					<%
						} else if (p.equalsIgnoreCase("events")) {
					%>
					<div id="list-events"></div>
					<script type="text/javascript" src="js/events.jsp"></script>
					<%
						} else if (p.equalsIgnoreCase("eventgroups")) {
					%>
					<div id="list-eventgroups"></div>
					<script type="text/javascript" src="js/eventgroups.jsp"></script>
					<%
						} else if (p.equalsIgnoreCase("orders")) {
					%>
					<div id="list-orders"></div>
					<script type="text/javascript" src="js/orders.jsp"></script>
					<% 
						}else {
					%>
					<div id="list-types"></div>
					<script type="text/javascript" src="js/types.jsp"></script>
					<%
						}
					%>
				</div>
			</div>
		</div>
	</div>
</body>

<script type="text/javascript">
	$(document).ready(function() {
		$("#forgot").hide();
		$("#loading").hide();
		$("#forgot_link").click(function() {
			$("#lock").hide("slow");
			$("#forgot").show("slow");
		});
		$("#close_forgot_form").click(function() {
			$("#lock").show("slow");
			$("#forgot").hide("slow");
		});
		$("#send").click(function() {
			$("#loading").show("slow");
		}, function() {
			$.ajax({
				type : 'POST',
				url : 'restore_password.jsp', //goi toi file ajax.php
				data : 'email=' + $("#email").val(),//du lieu gui di
				//cache: false,
				success : function(html) {
					$("#alert_message").html(html);
					$("#loading").hide("slow");
				}
			});
		});
	});
</script>
</html>